Some people might wonder how this page was generated and the answer to that is a very hacky shell script. All the pages themself are written in markup and compiled with smu which is a great little tool. They are processed slightly by the hacky shell script to allow for the style sheet and such
Then they get synced with my other server to allow for a synced page, as referenced in the last post.
Here is the cursed script for thoses who want to see:
#!/bin/bash
IFS=$'\n'
names=$(find ./pages/ -type f -name "*" ! -printf '%T@ %p\n' | sort -k 1 -n | sed 's/^[^ ]* //' | grep \.md)
outpath=./out
mkdir -p $outpath
cp style.css $outpath
for name in $names; do
out=$(basename -s ".md" "$name")
echo "<link rel="stylesheet" href="style.css"><div>" > $outpath/"$out.html"
smu $name >> $outpath/"$out.html" || exit 1
echo "</div>" >> $outpath/"$out.html"
echo "compiled ${out}"
done
mv $outpath/index.html ./index.html
newnames=$(find ./out/ -type f -name "*" ! -printf '%T@ %p\n' | sort -k 1 -n -r | sed 's/^[^ ]* //' | grep \.html)
echo "<div><h1>Blogs</h1>" >> index.html
for name in $newnames; do
echo "<a href=\""$name"\">$(basename -s .html "$name")</a><br>" >> index.html
done
echo "</div>" >> index.html
echo "done!"
I've skipped the syncing stuff to avoid any doxing
Anyway, bye!